1. Field of the Invention
The present invention relates to processing for quantizing the image data of pixels.
2. Description of the Related Art
Quantizing gradation image data has been performed conventionally. For example, gradation image data with 256 grayscale is binarized. In this case, error is high if the gradation image data is simply binarized using a threshold value. For example, it is assumed that the gradation image data is 0 to 255 and the threshold value is 128. In this case, if the data (density) of a pixel is 50, which is less than the threshold value, 0 is the result after binarization. This means that the error generated is 50 (=50−0).
Therefore an error diffusion method is used for dispersing the error which occurs at quantization into peripheral pixels. In the error diffusion method, the error which occurs at quantization is added to the data of the pixels at the right, below, lower left and lower right of this pixel, for example. An overview of the error diffusion method is stated, for example, in Japanese Patent Application Laid-Open No. H6-62253 (FIG. 30, FIG. 316, FIG. 32).
Another technology disclosed is generating cells by searching input pixels using a predetermined table until the gradation value of the image data which was input reaches the threshold value, and generating a dot at the center position of the cell (e.g. Japanese Patent Application Laid-Open No. H11-27528 (FIG. 4, FIG. 6).
In an image quantized by the error diffusion method, however, an image quality problem may be generated. For example, if pixels in an area where the dot density is low, such as an area near the highlight of the gradation image data, are simply binarized sequentially from the left side to the right side of the screen in the row sequence, error propagates to the pixels at the right, and dots which are generated as a result may connect like a chain. Such a chain-type specific pattern is called a “worm”. Also in an area where the dot density is low, such as an area near the highlight, the generation of dots may delay in the main scanning direction and the sub-scanning direction of the error diffusion method. In other words, at the top side of the paper where the area near the highlight is printed, the gradation values of the pixels do not easily reach the threshold value even if the error is propagated, and an area where no dots exist may be generated. Also after processing a specific gradation area, the data (density) outside this area may be distorted. In other words, in an area where the edges switch (boundary area between a part printed in black and a part printed in white during monochrome printing), the error propagated before switching continuously propagates after switching, which may result in the distortion of the generation of dots.